/**
 * \file network/layers/ip.h
 * \date 10-16-2009
 * \author Davide Gessa
 */
#ifndef IP_H
#define IP_H

#include <ctype.h>

/**
 * Header di un pacchetto ip
 */
typedef struct
{
	uint16_t version:4;
	uint16_t ihl:4;
	uint16_t type:8;
	uint16_t lenght:16;
	uint16_t identification:16;
	uint16_t flags:4;
	uint16_t fragment_offset:12;
	uint16_t time_to_liv:8;
	uint16_t protocol:8;
	uint16_t header_checksum:16;
	uint32_t source_address;
	uint32_t destination_address;
} ip_packet_header_t;

#endif
